Multi-threaded applications (clients or servers) often cache the results of computations (e.g. result sets from queries) to avoid repeating the computations. Invalidating or updating of these caches is often the hardest part of managing them (except in the simple case of caching immutable data, where only expiration for memory management purposes is needed).
In the case of a cache of database query results, modifications to the database may require invalidating or updating entries in the cache. Simplistic solutions exist, such as invalidating the cache when the update is performed, but this opens a timing window where another thread can load the old data into the cache before the update is committed (and a similar problem occurs when invalidation is done after the update is committed). These simplistic solutions also have the problem that when an entry is not found in the cache, each interested thread must compute that value, unaware of duplicate effort by other threads, or worse, changes that are about to be made by other threads, which can lead to overwriting of new values with old values.
There are a number of commercial solutions (e.g. ObjectGrid by IBM) supporting caching in a cluster, with coordination with database updates (e.g. using a distributed transaction manager). For simpler applications (e.g. not scaling to multiple servers), there is a shortage on available solutions.